Package com.cisco.pt.ipc.sim.impl
Class MCUImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.DeviceImpl
com.cisco.pt.ipc.sim.impl.MCUImpl
- Direct Known Subclasses:
MCUComponentImpl,SBCImpl
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionMCUImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSerialOutputs(String output) Information provided by the PKI file:voidanalogWrite(int slotNum, int value) Information provided by the PKI file:voidInformation provided by the PKI file:voiddigitalWrite(int slotNum, int value) Information provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:getComponentAtSlot(int slotNum) Information provided by the PKI file:getComponentByName(String slotName) Information provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:intgetSubComponentIndex(String componentName) Information provided by the PKI file:voidsetSubComponentIndex(String componentName, int index) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.DeviceImpl
activityTreeToXml, addCustomVar, addDeviceExternalAttributes, addModule, addProgrammingSerialOutputs, addSound, addUserDesktopApp, addUserDesktopAppFromGlobal, clearDeviceExternalAttributes, clearProgrammingSerialOutputs, destroySounds, getAreaLeftX, getAreaTopY, getCenterXCoordinate, getCenterYCoordinate, getCommandLine, getCustomInterface, getCustomLogicalImage, getCustomPhysicalImage, getCustomVarNameAt, getCustomVarsCount, getCustomVarStr, getCustomVarValueStrAt, getDescriptor, getDeviceExternalAttributes, getDeviceExternalAttributeValue, getGlobalXPhysicalWS, getGlobalYPhysicalWS, getModel, getName, getPhysicalObject, getPort, getPortAt, getPortCount, getPorts, getPower, getProcess, getProgrammingSerialOutputs, getRootModule, getSerialNumber, getSupportedModule, getType, getUpTime, getUsbPortAt, getUsbPortCount, getUserDesktopAppAt, getUserDesktopAppByDir, getUserDesktopAppById, getUserDesktopAppCount, getXCoordinate, getXPhysicalWS, getYCoordinate, getYPhysicalWS, hasCustomVar, isDesktopAvailable, isOutdated, isProjectRunning, moveByInPhysicalWS, moveToLocation, moveToLocationCentered, moveToLocInPhysicalWS, playSound, relinkUserDesktopApp, removeCustomVar, removeModule, removeUserDesktopApp, restoreToDefault, runCodeInProject, runProject, serializeToXml, setCustomInterface, setCustomLogicalImage, setCustomPhysicalImage, setDeviceExternalAttributes, setName, setPower, setTime, stopProject, stopSound, stopSounds, subtractDeviceExternalAttributes, updateTemplateCreationTimeMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.sim.Device
activityTreeToXml, addCustomVar, addDeviceExternalAttributes, addModule, addProgrammingSerialOutputs, addSound, addUserDesktopApp, addUserDesktopAppFromGlobal, clearDeviceExternalAttributes, clearProgrammingSerialOutputs, destroySounds, getAreaLeftX, getAreaTopY, getCenterXCoordinate, getCenterYCoordinate, getCommandLine, getCustomInterface, getCustomLogicalImage, getCustomPhysicalImage, getCustomVarNameAt, getCustomVarsCount, getCustomVarStr, getCustomVarValueStrAt, getDescriptor, getDeviceExternalAttributes, getDeviceExternalAttributeValue, getGlobalXPhysicalWS, getGlobalYPhysicalWS, getModel, getName, getPhysicalObject, getPort, getPortAt, getPortCount, getPorts, getPower, getProcess, getProgrammingSerialOutputs, getRootModule, getSerialNumber, getSupportedModule, getType, getUpTime, getUsbPortAt, getUsbPortCount, getUserDesktopAppAt, getUserDesktopAppByDir, getUserDesktopAppById, getUserDesktopAppCount, getXCoordinate, getXPhysicalWS, getYCoordinate, getYPhysicalWS, hasCustomVar, isDesktopAvailable, isOutdated, isProjectRunning, moveByInPhysicalWS, moveToLocation, moveToLocationCentered, moveToLocInPhysicalWS, playSound, relinkUserDesktopApp, removeCustomVar, removeModule, removeUserDesktopApp, restoreToDefault, runCodeInProject, runProject, serializeToXml, setCustomInterface, setCustomLogicalImage, setCustomPhysicalImage, setDeviceExternalAttributes, setName, setPower, setTime, stopProject, stopSound, stopSounds, subtractDeviceExternalAttributes, updateTemplateCreationTimeMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession
-
Constructor Details
-
MCUImpl
public MCUImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
getDigitalSlotsOffset
public int getDigitalSlotsOffset()Information provided by the PKI file:
\class MCU \brief MCU is the class for a mcu board component, used to make and control things. \example network().getDevice("MCU0") \brief Analog and digital slots share the same indexing. This returns the starting index of the digital slots. \return int, the starting index of the digital slots.- Specified by:
getDigitalSlotsOffsetin interfaceMCU- Returns:
- int Returns a int
-
getDigitalSlotsCount
public int getDigitalSlotsCount()Information provided by the PKI file:
\brief Returns the number of digital slots. \return int, the number of digital slots.- Specified by:
getDigitalSlotsCountin interfaceMCU- Returns:
- int Returns a int
-
getAnalogSlotsOffset
public int getAnalogSlotsOffset()Information provided by the PKI file:
\brief Analog and digital slots share the same indexing. This returns the starting index of the analog slots. \return int, the starting index of the analog slots.- Specified by:
getAnalogSlotsOffsetin interfaceMCU- Returns:
- int Returns a int
-
getAnalogSlotsCount
public int getAnalogSlotsCount()Information provided by the PKI file:
\brief Returns the number of analog slots. \return int, the number of analog slots.- Specified by:
getAnalogSlotsCountin interfaceMCU- Returns:
- int Returns a int
-
getSlotsCount
public int getSlotsCount()Information provided by the PKI file:
\brief Returns the total number of analog and digital slots. \return int, the total number of analog and digital slots.- Specified by:
getSlotsCountin interfaceMCU- Returns:
- int Returns a int
-
getComponentAtSlot
Information provided by the PKI file:
\brief Returns the component at the given slot index. \param slotNum, slot index to retrive the component from. \return IoEComponent, the component at the given slot index. Remember that analog and digital indexes need to be offset with getAnalogSlotsOffset() or getDigitalSlotsOffset().- Specified by:
getComponentAtSlotin interfaceMCU- Parameters:
slotNum- Takes in a parameter of slotNum- Returns:
- IoEComponent Returns a IoEComponent
-
getComponentByName
Information provided by the PKI file:
\brief Returns the component with the given name. \param slotName, slot name to retrive the component from. Something like "D0" or "A1" \return IoEComponent, the component with the given name.- Specified by:
getComponentByNamein interfaceMCU- Parameters:
slotName- Takes in a parameter of slotName- Returns:
- IoEComponent Returns a IoEComponent
-
digitalWrite
public void digitalWrite(int slotNum, int value) Information provided by the PKI file:
\brief Writes a digital signal with the given value to the given slot. \param slotNum, slot index to write to. \param value, value to write.- Specified by:
digitalWritein interfaceMCU- Parameters:
slotNum- Takes in a parameter of slotNumvalue- Takes in a parameter of value
-
analogWrite
public void analogWrite(int slotNum, int value) Information provided by the PKI file:
\brief Writes a analog signal with the given value to the given slot. \param slotNum, slot index to write to. \param value, value to write.- Specified by:
analogWritein interfaceMCU- Parameters:
slotNum- Takes in a parameter of slotNumvalue- Takes in a parameter of value
-
addSerialOutputs
Information provided by the PKI file:
\brief Writes to the mcu output. Text appears in the MCU output dialog. \param output, text to write.- Specified by:
addSerialOutputsin interfaceMCU- Parameters:
output- Takes in a parameter of output
-
getSerialOutputs
Information provided by the PKI file:
\brief Gets the mcu output. It is the text that appears in the MCU output dialog. \return string, value is the text that appears in the MCU output dialog.- Specified by:
getSerialOutputsin interfaceMCU- Returns:
- String Returns a String
-
clearSerialOutputs
public void clearSerialOutputs()Information provided by the PKI file:
\brief Clears the MCU output dialog.- Specified by:
clearSerialOutputsin interfaceMCU
-
setSubComponentIndex
Information provided by the PKI file:
\brief Sets the current image index of the subcomponent \arg componentName, name of the component \arg index, index to set it to- Specified by:
setSubComponentIndexin interfaceMCU- Parameters:
componentName- Takes in a parameter of componentNameindex- Takes in a parameter of index
-
getSubComponentIndex
Information provided by the PKI file:
\brief Gets the index of the subcomponent \arg componentName, name of the component \return int, index of the component- Specified by:
getSubComponentIndexin interfaceMCU- Parameters:
componentName- Takes in a parameter of componentName- Returns:
- int Returns a int
-